#ifndef FASYS_FASYS_SSERVICE_MESSAGE_JSON_HPP
#define FASYS_FASYS_SSERVICE_MESSAGE_JSON_HPP

#include "../message.hpp"
#include "../aspect/names.hpp"
#include "types.hpp"
#include <fas/misc/json.hpp>

namespace fasys{ namespace sservice{

namespace aj = ::fas::json;
namespace ap = ::fas::pattern;

typedef
  aj::object<
    message,
    ap::type_list_n<
      aj::member<n_order, message, order_t, &message::order>,
      aj::member<n_limit, message, size_t, &message::limit>,
      aj::member<n_lifetime, message, time_t, &message::lifetime>,
      aj::member<n_channel, message, std::string, &message::channel>,
      aj::member<n_content, message, data_t, &message::content,  aj::raw_value<data_t> >
    >::type
  > publish_json;

}}

#endif
